<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>代录人名单</title>
    <meta name="viewport" content="initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="stylesheet" href="/static/wx/lib/sui/sm.min.css">
    <link rel="stylesheet" href="/static/wx/lib/sui/sm-extend.min.css">
    <link rel="stylesheet" href="/static/wx/css/reset.css">
    <link rel="stylesheet" href="/static/wx/css/main.css">
    <link rel="stylesheet" href="/static/wx/css/public_main.css">
</head>

<body>
    <div class="page-group">
        <div class="page page-current" id="recorderList">
            <!-- 主内容 -->
            <div class="content ovh">
                <div class="list-block media-list">
                    <ul id="recorderLista">
                        {volist name="list" id="vo"}
                        <li>
                            <div class="item-content">
                                <!-- <div class="item-media"><img src="http://gqianniu.alicdn.com/bao/uploaded/i4//tfscom/i3/TB10LfcHFXXXXXKXpXXXXXXXXXX_!!0-item_pic.jpg_250x250q60.jpg"
                                        width="44"></div> -->
                                <div class="item-inner">
                                    <div class="item-title-row">
                                        <div class="item-title size-m">
                                            姓名：<span>{$vo.username}</span>
                                            手机：<span>{$vo.mobile}</span>
                                        </div>
                                    </div>
                                    <div class="item-subtitle size-m">代录人类型：<span>{$vo.recoder_name}</span></div>
                                </div>
                                <div class="btn size-m" onclick="deleteInfo({$vo.recordor_id},this)">
                                    删除
                                </div>
                            </div>
                        </li>
                        {/volist}
                    </ul>
                </div>
                <div class="btn-box">
                    <div class="my-btn size-m" id ='addOther'>
                        <span class="active">添加</span>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script type='text/javascript' src='/static/wx/lib/sui/zepto.min.js' charset='utf-8'></script>
    <script type='text/javascript' src='/static/wx/lib/sui/sm.min.js' charset='utf-8'></script>
    <script type='text/javascript' src='/static/wx/lib/sui/sm-extend.min.js' charset='utf-8'></script>
    <script type='text/javascript' src="/static/wx/lib/vue/vue.min.js"></script>
    <script type="text/javascript" src="/static/wx/js/zepto.touchWipe.js"></script>
    <script>
        var vm = new Vue({
            el: '#recorderLista',
            mounted() {
                $('.item-content').touchWipe({ itemDelete: '.btn' });
            },
        methods: {
            login: function () {
                console.log('login in ing')
            },
            removePhone: function () {
                this.phone = '';
                this.showClose = false
            },
            doEncode: function () {
                this.encode = !this.encode
            },
          },
        })
        function deleteInfo(id,This) {
            $.ajax({
                type: 'POST',
                url: '/wx/Insurer/unbindOther',
                data: {
                    'recordor_id': id,
                },
                dataType: 'json',
                success: function (Json) {
                    if (Json.code == 200) {
                        $.alert('删除成功');
                        $(This).parent().parent().remove();
                    } else {
                        $.alert('删除失败');
                    }
                }
            });
        }
        $(document).on('click', '#addOther', function () {
            location.href="{:url('insurer/bindOther')}";
        });
    </script>
</body>

</html>